<?php

/**
 * Flaws form base class.
 *
 * @method Flaws getObject() Returns the current form's model object
 *
 * @package    rpgcom
 * @subpackage form
 * @author     Your name here
 */
abstract class BaseFlawsForm extends BaseFormPropel
{
  public function setup()
  {
    $this->setWidgets(array(
      'idFlaw' => new sfWidgetFormInputHidden(),
      'name'   => new sfWidgetFormInputText(),
      'effect' => new sfWidgetFormTextarea(),
      'xpGain' => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'idFlaw' => new sfValidatorPropelChoice(array('model' => 'Flaws', 'column' => 'idFlaw', 'required' => false)),
      'name'   => new sfValidatorString(array('max_length' => 55)),
      'effect' => new sfValidatorString(),
      'xpGain' => new sfValidatorInteger(array('min' => -2147483648, 'max' => 2147483647)),
    ));

    $this->widgetSchema->setNameFormat('flaws[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    parent::setup();
  }

  public function getModelName()
  {
    return 'Flaws';
  }


}
